home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / setfiletype.man < prev    next >
Encoding:
Text File  |  1990-03-04  |  2.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. SETFILETYPE           C Library Procedures            SETFILETYPE
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      setfiletype - change advisory file type of file
  10.  
  11. SSYYNNOOPPSSIISS
  12.      sseettffiilleettyyppee((ppaatthh,, ttyyppee))
  13.      cchhaarr **ppaatthh;;
  14.      iinntt ttyyppee;;
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The file whose name is given by _p_a_t_h has its type changed to
  18.      _t_y_p_e.  Types are defined in <_f_s._h>.
  19.           FS_USER_TYPE_UNDEFINED  0   no type set
  20.           FS_USER_TYPE_TMP        1   temporary file
  21.           FS_USER_TYPE_SWAP       2   swap file
  22.           FS_USER_TYPE_OBJECT     3   object file
  23.           FS_USER_TYPE_BINARY     4   executable
  24.           FS_USER_TYPE_OTHER      5   file that doesn't correspond to any specific type
  25.  
  26.      The advisory file type is used by the system for statistics
  27.      gathering.  At some point in the future, it may be used for
  28.      performance enhancements as well: for example,  varying the
  29.      amount of time allowed before flushing a file to disk,
  30.      depending on the importance of not losing data from it.
  31.  
  32.      Only the owner of a file (or the super-user) may change its
  33.      type.
  34.  
  35. RREETTUURRNN VVAALLUUEE
  36.      Upon successful completion, a value of 0 is returned.  Oth-
  37.      erwise, a value of -1 is returned and _e_r_r_n_o is set to indi-
  38.      cate the error.
  39.  
  40. EERRRROORRSS
  41.      _S_e_t_f_i_l_e_t_y_p_e will fail and the file type will be unchanged
  42.      if:
  43.  
  44.      [ENOTDIR]      A component of the path prefix is not a
  45.                     directory.
  46.  
  47.      [EINVAL]       The pathname contains a character with the
  48.                     high-order bit set.
  49.  
  50.      [ENAMETOOLONG] A component of a pathname exceeded 255 char-
  51.                     acters, or an entire path name exceeded 1023
  52.                     characters.
  53.  
  54.      [ENOENT]       The named file does not exist.
  55.  
  56.      [EACCES]       Search permission is denied for a component
  57.                     of the path prefix.
  58.  
  59.      [ELOOP]        Too many symbolic links were encountered in
  60.  
  61.  
  62.  
  63. Sprite v1.0             January 18, 1989                        1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SETFILETYPE           C Library Procedures            SETFILETYPE
  71.  
  72.  
  73.  
  74.                     translating the pathname.
  75.  
  76.      [EPERM]        The effective user ID does not match the
  77.                     owner of the file and the effective user ID
  78.                     is not the super-user.
  79.  
  80.      [EROFS]        The named file resides on a read-only file
  81.                     system.
  82.  
  83.      [EFAULT]       _P_a_t_h points outside the process's allocated
  84.                     address space.
  85.  
  86.      [EIO]          An I/O error occurred while reading from or
  87.                     writing to the file system.
  88.  
  89. SSEEEE AALLSSOO
  90.      chown(2), stat(2)
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0             January 18, 1989                        2
  130.  
  131.  
  132.  
  133.